<template>
  <c-select
    v-bind="$attrs"
    v-on="$listeners"
    :value="value"
    :options="goods"
    :props="props"
  ></c-select>
</template>
<script>
export default {
  components: {},
  props: {
    value: String,
  },
  model: {
    prop: 'value',
    event: 'change',
  },
  data() {
    return {
      loading: false,
      goods: [],
      props: {
        label: 'load_name',
        value: 'industrial_package_id',
      },
    }
  },
  computed: {},
  watch: {},
  created() {
    this.getData()
  },
  mounted() {},
  methods: {
    async getData() {
      this.loading = true
      const [res] = await this.$utils.promise(
        this.$api.getData(this.$serviceName, 'industrial_package')
      )
      this.loading = false
      this.goods = (res && res.data) || []
    },
  },
}
</script>

<style lang="scss" scoped></style>
